<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="hmg.common.CommonUtils"%>
<%@ page import="hmg.common.ValueHolder"%>
<%@ page import="hmg.vo.BoardVO"%>
<%--
    JSP Name : jspName.jsp
    Description : 설명을 기술합니다.
    author Kim hyung soo
    since 2012. 9. 7.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 9. 7.     Kim hyung soo     최초 생성
--%>
<%
    BoardVO news = (BoardVO) request.getAttribute("NewsInfo");

    String searchKeyword = CommonUtils.getDecodedParameter(request.getParameter("searchKeyword"), "");
    String indexType = CommonUtils.getParameter(request.getParameter("indexType"), "");
    String currPage = CommonUtils.getParameter(request.getParameter("page"), "1");
    String ogImageURL = "";

    String[] consonant = {"ㄱ", "ㄴ", "ㄷ", "ㄹ", "ㅁ", "ㅂ", "ㅅ", "ㅇ", "ㅈ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"};
    String[] alphabet = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};

    String title = "";

    if (news.getTitle() != null)
        title = news.getTitle();

    if (news.getSubtitle() != null)
        title += " [" + news.getSubtitle() + "]";

    if (news.getThumbnailImage() != null)
        ogImageURL = ValueHolder.SERVER_DOMAIN + news.getThumbnailImage();
    else
        ogImageURL = ValueHolder.SERVER_DOMAIN + ValueHolder.DEFAULT_IMAGE_PATH;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>그룹용어사전 | 현대자동차그룹</title>
<meta name="description" content="현대자동차그룹 용어사전 보기" />
<meta name="keywords" content="현대자동차그룹 용어사전, 현대차그룹 용어사전, 그룹용어사전, 용어사전, 사전" />
<%@ include file="/WEB-INF/jsp/web/kor/include/header.jspf" %>
<script type="text/javascript" src="/hmg/js/web/kor/com/jquery.easing.1.3.js"></script>
<script type="text/javascript">
//<![CDATA[
var indexType = "<%= indexType %>";

$(document).ready(function(){
    $("#newsTab" + indexType).addClass("on");
});

function fn_search() {
    var searchKeyword = $("#searchKeyword").val();

    if (searchKeyword == "") {
        alert("검색어를 입력해 주세요.");
        return;
    }

    document.location.href = "./TermDictionaryList.do?searchKeyword=" + escape(encodeURIComponent(searchKeyword)) + "&page=1";
}

function fn_list_by_type(indexType) {
    if (indexType == undefined)
        indexType = "";

    document.location.href = "./TermDictionaryList.do?indexType=" + indexType + "&page=1";
}

function fn_list_search(){
    var searchKeyword = $("#searchKeyword").val();

    if (searchKeyword == "") {
        alert("검색어를 입력해 주세요.");
        return;
    }

    document.location.href = "./TermDictionaryList.do?searchKeyword=" + escape(encodeURIComponent(searchKeyword)) + "&page=1";
}

function fn_print_news() {
    window.open('./TermDictionaryViewPrint.do?listID=<%= news.getListID() %>','현대자동차그룹공식홈페이지','scrollbars=yes, toolbar=yes, width=750, height=480');
}

//]]>
</script>
<meta property="og:type"        content="article" />
<meta property="og:url"         content="<%= ValueHolder.SERVER_DOMAIN + request.getAttribute("javax.servlet.forward.request_uri") + "?" + request.getQueryString() %>" />
<meta property="og:title"       content="<%= news.getTitle() %>" />
<meta property="og:description" content="<%= CommonUtils.getPlainText(news.getWebContent(), true, 100).replace("\n", " ").trim() %>" />
<meta property="og:image"       content="<%= ogImageURL %>" />
</head>
<body>
    <!--wrap-->
    <div id="wrap">
        <!-- skip navigation -->
        <div id="skipnavition">
            <a href="#gnb">메뉴바로가기</a><a href="#content">본문바로가기</a>
        </div>
        <!--// skip navigation -->

        <hr />

        <!-- header-->
        <%@ include file="/WEB-INF/jsp/web/kor/include/left.jspf" %>
        <!--//header-->

        <hr />

        <!--container-->
        <div id="container">
            <div class="scroll-pane">
            <!-- 공통 -->
            <div class="subTitle">
                <div class="pageTitle">
                    <h2><img src="/hmg/images/web/kor/title/sch_Dictionary.gif" alt="그룹용어사전" /></h2>
                </div>

                <div class="pageLocation">
                    <ul>
                        <li><a href="/hmg/web/kor/Main.do"><img src="/hmg/images/web/kor/common/location_home.gif" alt="홈"/></a></li>
                        <li class="nowPage"><a href="/hmg/web/kor/sch/trm/TermDictionaryList.do">그룹용어사전</a></li>
                    </ul>
                </div>
            </div>
            <!--//공통-->

            <!--contents-->
            <div id="content">

            <!-- 내용 -->
            <div class="dictionary">

                <div class="view_Icon">
                    <a href="javascript:fn_share_facebook(document.location, '<%= news.getTitle() %>');"><img src="/hmg/images/web/kor/common/icon_facebook.gif" alt="페이스북" /></a>
                    <a href="javascript:fn_share_twitter(document.location, '<%= news.getTitle() %>');"><img src="/hmg/images/web/kor/common/icon_twitter.gif" alt="트위터" /></a>
                    <a href="javascript:fn_print_news();"><img src="/hmg/images/web/kor/btn/btn_print.gif" alt="Print" /></a>
                    <a href="#" onclick="javascript:fn_font_size(1);"><img src="/hmg/images/web/kor/btn/text_Sizeup.gif" alt="글자 크게" /></a>
                    <a href="#" onclick="javascript:fn_font_size(-1);"><img src="/hmg/images/web/kor/btn/text_Sizedown.gif" alt="글자 작게" /></a>
                </div>

                <div class="dictionary_Box mbNone">
                    <div class="dic_Top">
                        <div class="search_Area">
                            <img src="/hmg/images/web/kor/sch/sch_Icon.gif" alt="검색" class="sch_icon"/>
                            <input type="text" title="최신용어" id="searchKeyword" name="searchKeyword" value="<%= searchKeyword %>" onkeypress="javascript:if (event.keyCode==13) {fn_search();}"/>
                            <a href="#" onclick="javascript:fn_search();"><img src="/hmg/images/web/kor/btn/btn_search.gif" alt="검색"  class="btn"/></a>
                            <a href="/hmg/web/kor/sch/trm/TermDictionaryList.do"><img src="/hmg/images/web/kor/btn/btn_recentWord.gif" alt="최신용어"  class="btn02"/></a>
                        </div>
                        <dl class="dic">
                            <dt>가나다순 색인</dt>
                            <dd>
                                <ul class="korean">
<%  for (int idx = 0; idx < consonant.length; idx++) { %>
                                    <li id="newsTab<%= idx %>" class="tab01"><a href="javascript:fn_list_by_type(<%= idx %>);"><%= consonant[idx] %></a></li>
<%  } %>
                                </ul>
                            </dd>

                            <dt>알파벳순 색인</dt>
                            <dd>
                                <ul class="english">
<%  for (int idx = 0; idx < alphabet.length; idx++) { %>
                                    <li id="newsTab<%= idx + 14 %>" class="tab14"><a href="javascript:fn_list_by_type(<%= idx + 14 %>);"><%= alphabet[idx] %></a></li>
<%  } %>
                                </ul>
                            </dd>
                        </dl>
                    </div>
                    <div class="dic_Bot">
                        <p class="title"><%= title %></p>
<%  if (news.getThumbnailImage() != null) { %>
                        <p class="picture"><img src="<%= news.getThumbnailImage() %>" width="382" height="225" border="0" alt="용어사전 사진"/></p>
<%  } %>
                        <p><%= news.getWebContent() %></p>
                    </div>
                </div>

                <div class="gropnews_page">
                    <div class="gropnews_page_right">
                        <a href="javascript:fn_list_by_type(<%= indexType %>);"><img src="/hmg/images/web/kor/btn/btn_list02.gif" alt="목록" /></a>
                    </div>
                </div>

            </div>
            <!--// 내용 -->

            </div>
            <!--//contents-->
            </div>
        </div>
        <!--//container-->

        <hr />

        <!--footer-->
        <%@ include file="/WEB-INF/jsp/web/kor/include/footer.jspf" %>
        <!--//footer-->
        <hr />
        <!--notice-->
        <%@ include file="/WEB-INF/jsp/web/kor/include/notice.jspf" %>
        <!--//notice-->
    </div>
    <!--//wrap-->
</body>
</html>